﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CostDriverInput.aspx.cs"
    Inherits="Hisun.View.CostDriver.CostDriverInput" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>


<script language="javascript" for="document" event="onkeydown">

  if(event.keyCode==13 && event.srcElement.type!="button" && event.srcElement.type!="submit" && event.srcElement.type!="reset" && event.srcElement.type!="textarea" && event.srcElement.type!="")
{
      event.keyCode=9;
   }

</script> 



</head>
<body>
    <form id="form1" runat="server">
      <div class =" CommonPage_MainPanel">
    <div class ="CommonPage_Banner"><div class = "CommomPage_Title">资源动因录入</div></div>
    <div class ="CommonPage_Body">

        <table >
            <tr>
                <td>
                    <asp:Label ID="Label3" runat="server" Text="过滤条件：" SkinID="Label"></asp:Label>
                    <asp:TextBox ID="TextBox_FilterText" runat="server" SkinID="TextBox"></asp:TextBox>
                    <asp:Button SkinID = "Button" ID="Button_fullCenterList" runat="server" 
                        onclick="Button_fullCenterList_Click" Text="刷新" />
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label1" runat="server" Text="作业中心：" SkinID="Label"></asp:Label>
                    <asp:DropDownList ID="DropDownList_CostCenter" runat="server" Height="21px" Width="180px"
                        OnSelectedIndexChanged="DropDownList_CostCenter_SelectedIndexChanged" 
                        AutoPostBack="True" SkinID="DropdownList">
                    </asp:DropDownList>
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="5" style="background-color: #C0C0C0">
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    <asp:Panel ID="Panel_GridList" runat="server" Visible="False">
                        <asp:Label ID="Label7" runat="server" SkinID="Label" Text="填充历史期间动因量："></asp:Label>
                        <asp:DropDownList ID="DropDownList_Year" runat="server" SkinID="DropdownList">
                    </asp:DropDownList>
                    <asp:DropDownList ID="DropDownList_Month" runat="server" Height="16px" 
                        SkinID="DropdownList" Width="51px">
                    </asp:DropDownList>
                        <asp:Button SkinID = "Button" ID="Button_FullHistoryDirver" runat="server" Text="GO" 
                            onclick="Button_FullHistoryDirver_Click" />
                        <asp:GridView ID="GridView_CostCenterDriver" runat="server" SkinID="GridView" 
                            AutoGenerateColumns="False" 
                            onrowdatabound="GridView_CostCenterDriver_RowDataBound" ShowFooter="True">
                            <Columns>
                                <asp:BoundField DataField="目标中心ID" HeaderText="目标中心ID" ReadOnly="True" SortExpression="目标中心ID" />
                                <asp:BoundField DataField="目标中心名称" HeaderText="目标中心名称" />
                                <asp:BoundField DataField="成本动因ID" HeaderText="成本动因ID" />
                                <asp:BoundField DataField="成本动因名称" HeaderText="成本动因名称" />
                                <asp:TemplateField HeaderText="动因量" SortExpression="动因量">
                                    <EditItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("动因量") %>'></asp:Label>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:TextBox ID="TextBox_DriverAmount" runat="server" Text='<%# string.Format("{0:F2}",Eval("动因量")) %>'
                                            Height="22px" Width="136px"></asp:TextBox>
                                        <asp:CompareValidator ID="CompareValidator_DriverAmount" runat="server" ControlToValidate="TextBox_DriverAmount"
                                            ErrorMessage="*" Operator="DataTypeCheck" Type="Double" ValidationGroup="Group"></asp:CompareValidator>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                        <asp:Button SkinID = "Button" ID="Button_Save" runat="server" OnClick="Button_Save_Click" Text="保存"
                            ValidationGroup="Group" />
                    </asp:Panel>
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td style="background-color: #C0C0C0" colspan="5">
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label4" runat="server" SkinID="Label" Text="*将以上动因量信息复制到其他作业路径"></asp:Label>
                    <asp:LinkButton ID="LinkButton_VisibleTheDriverCopyPanel" runat="server" 
                        onclick="LinkButton_VisibleTheDriverCopyPanel_Click">GO</asp:LinkButton>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    <asp:Panel ID="Panel_CopyDriver" runat="server" Visible="False">
                                        <asp:Label ID="Label6" runat="server" SkinID="Label" Text="过滤条件："></asp:Label>
                    <asp:TextBox ID="TextBox_CopyFilter" runat="server" SkinID="TextBox"></asp:TextBox>
                    <asp:Button SkinID = "Button" ID="Button_Query" runat="server" onclick="Button_Set_Click" 
                        Text="查询" />
                                        <asp:Panel ID="Panel_CopyList" runat="server">
                                            <asp:Label ID="Label5" runat="server" SkinID="Label" 
                                                Text="*如果复制的目标不在列表中，请检查作业分配路径设置模块中的设置"></asp:Label>
                                            <asp:GridView ID="GridView_CoypList" runat="server" AutoGenerateColumns="False" 
                                                SkinID="GridView">
                                                <Columns>
                                                    <asp:BoundField DataField="作业中心ID" HeaderText="作业中心ID" />
                                                    <asp:BoundField DataField="作业中心名称" HeaderText="作业中心名称" />
                                                    <asp:BoundField DataField="成本动因ID" HeaderText="成本动因ID" />
                                                    <asp:BoundField DataField="成本动因名称" HeaderText="动因名称" />
                                                    <asp:TemplateField HeaderText="选择">
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="CheckBox_Select" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                            </asp:GridView>
                                            <asp:Button SkinID = "Button" ID="Button_Execute" runat="server" Height="26px" 
                                                onclick="Button_Execute_Click" 
                                                onclientclick="return confirm('执行本操作，将更新以上作业中心对应的分配动因，确定执行吗？')" Text="复制" 
                                                Width="40px" />
                                        </asp:Panel>
                                        <br />
                    </asp:Panel>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    <asp:HiddenField ID="HiddenField_CurrentCenterId" runat="server" />
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
    </div></div>
    </form>
</body>
</html>
<% = alert%>